/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 *                                                                           *
 *                          Copyright (c) 2010                               *
 *                  Alen Stojanov [ ioi.alen@gmail.com ]                     *
 *                Jacobs University Bremen, Bremen, Germany                  *
 *                                                                           *
 *                          All Rights Reserved.                             *
 *                                                                           *
 *    Permission to use, copy, modify and distribute this software and       *
 *    its documentation is hereby granted, provided that both the            *
 *    copyright notice and this permission notice appear in all copies of    *
 *    the software, derivative works or modified versions, and any           *
 *    portions thereof, and that both notices appear in supporting           *
 *    documentation.                                                         *
 *                                                                           *
 *    This code is distributed in the hope that it will be useful, but       *
 *    WITHOUT ANY WARRANTY; without even the implied warranty of             *
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS       *
 *    DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER          *
 *    RESULTING FROM THE USE OF THIS SOFTWARE.                               *
 *                                                                           *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifndef TSRENDERER_H
#define TSRENDERER_H

#include <QtGui/QMainWindow>
#include <QStyle>
#include "ui_tsrenderer.h"

/**
 * @class TSRenderer
 * @author Alen Stojanov, September 2010
 *
 * @brief The main window of the TSRenderer
 *
 * This class represents the main window in the TSRenderer, it
 * has the main functionalities for opening and selecting time
 * series which are being rendered by TSView class
 *
 */
class TSRenderer : public QMainWindow
{
	Q_OBJECT

public:
	/**
	 * @brief Default constructor
	 */
	TSRenderer(QWidget *parent = 0);
	/**
	 * @brief Default destructor
	 */
	~TSRenderer();

private:
	/**
	 * User interface class
	 */
	Ui::TSRendererClass ui;
	/**
	 * Main menu tool New action
	 */
	QAction *actionMenuNew;
	/**
	 * Main menu tool Open action
	 */
	QAction *actionMenuOpen;
	/**
	 * Main menu tool Save action
	 */
	QAction *actionMenuSave;
	/**
	 * Main menu tool SaveAs action
	 */
	QAction *actionMenuSaveAs;
	/**
	 * Main menu tool New action
	 */
	QAction *actionMenuClose;
	/**
	 * Main menu tool Import action
	 */
	QAction *actionMenuImport;

public slots:
	/**
	 * @brief Create a new file render for TSView
	 */
	void on_actionNew_triggered ();
	/**
	 * @brief Open files in the TSView
	 */
	void on_actionOpen_triggered ();
	/**
	 * @brief Save the active view into tsr file
	 */
	void on_actionSave_triggered ();
	/**
	 * @brief Save the active view into a new tsr file
	 */
	void on_actionSaveAs_triggered ();
	/**
	 * @brief Close the active view
	 */
	void on_actionClose_triggered ();
	/**
	 * @brief Import new files into the TSView
	 */
	void on_actionImport_triggered ();
	/**
	 * @brief Change the TSView to tabbed view
	 */
	void on_actionTabs_triggered ();
	/**
	 * @brief Change the TSView to sub-windows
	 */
	void on_actionWindows_triggered ();
	/**
	 * @brief Show the about window
	 */
	void on_actionAbout_triggered ();

	/**
	 * @brief Show / hide the main toolbox
	 */
	void on_actionToggleMainToolbox_triggered ();
	/**
	 * @brief Show / hide the graph toolbox
	 */
	void on_actionToggleGraphToolbox_triggered ();

	/**
	 * @brief Detect when the left toolbar will change the visibility
	 */
	void on_toolBarLeft_visibilityChanged(bool visible);

	/**
	 * Switch the TSView into Line Graph Mode
	 */
	void on_cmdLineGraph_clicked ();
	/**
	 * Switch the TSView into Line Graph Mode
	 */
	void on_cmdLSPGraph_clicked ();
	/**
	 * Show / hide the preview graph
	 */
	void on_cmdPreviewGraph_clicked ();
	/**
	 * Show / hide the settings toolbar
	 */
	void on_cmdSettings_clicked();
};

#endif // TSRENDERER_H
